#ifndef ROUTE_H
#define ROUTE_H

#include "Interface.h"

class Route : public IRoute
{
public :

    explicit Route( Piece piece );
    
    ~Route( void );

public : // IRoute implementation

    inline Piece GetPiece( void ) const;
    
    inline const vector< Position > & GetRoute( void ) const;
    
    inline void AppendMove( const Position & position );
    
    void AppendMove( const IRoute * route );
    
    inline bool HasJumped( void ) const;
    
    inline unsigned int GetMoveCount( void ) const;
    
    inline void Cleanup( void );
    
    inline const Position * GetDestination( void ) const;
    
    inline const Position * GetAt( unsigned int index ) const;
    
    void RewindLastMoves( unsigned int count );
    
    IRoute * Clone( void );
    
    void Release( void );

private :

    Piece              m_piece;
    vector< Position > m_route;

    static void Release( Route * route );
};

#endif // ROUTE_H